<!DOCTYPE html>
<html class="x-admin-sm">
    
    <head>
        <meta charset="UTF-8">
        <title>欢迎页面-X-admin2.2</title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
        <link rel="stylesheet" href="./css/font.css">
        <link rel="stylesheet" href="./css/xadmin.css">
        <script src="./lib/layui/layui.js" charset="utf-8"></script>
        <script type="text/javascript" src="./js/xadmin.js"></script>
		<script type="text/javascript" src="./js/domain.js"></script>
        <!--[if lt IE 9]>
          <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
          <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
        <![endif]-->
    </head>

<html>
<head>
<title>加载默认</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">

<script src="javascript/LangUtil.js"></script>
<script type="text/javascript">
        // $(function() {
        //     document.querySelector("#def").innerHTML = LangUtil.val("readme", "默认值") + " jq";
        // })
        window.onload = function() {
            //这里有个问题，如果不刷新则无法更新
            document.querySelector("#def1").innerHTML = LangUtil.val("readme", "默认值") + " onload ";
            var lang = StorageUtil.get(language) || navigator.language || navigator.userLanguage;
            document.querySelector('#langchange option[value="' + lang + '"]').selected = true;
        };
    </script>
</head>
<body>

<select id="langchange" onchange="LangUtil.reloadPageAndChangeLang(this.options[this.selectedIndex].value)">
<option value="default">默认</option>
<option value="zh-CN">中文</option>
<option value="en">English</option>
</select>
<h1>测试一下哈哈哈</h1>
<div id="test">
<p class="tt">这个是默认显示的文字</p>
<input id="in" value="111222" style="width:300px" />
</div>
<div id="def"></div>
<div id="def1"></div>
</body>
</html>